
package com.goseet.ffmpeg;

public final class a extends c {
    private long b;

    public a() {
        this(ffmpegJNI.new_MediaOutput());
    }

    private a(long l) {
        super(ffmpegJNI.SWIGMediaOutputUpcast(l));
        b = l;
    }

    protected static long a(a a1) {
        long l;
        if (a1 == null)
            l = 0L;
        else
            l = a1.b;
        return l;
    }

    public final void a() {
        synchronized (this) {
            if (b != 0L) {
                if (a) {
                    a = false;
                    ffmpegJNI.delete_MediaOutput(b);
                }
                b = 0L;
            }
            super.a();
        }
    }

    public final boolean a(String s, b b1) {
        long l = b;
        long l1 = com.goseet.ffmpeg.b.a(b1);
        a a1 = this;
        String s1 = s;
        b b2 = b1;
        return ffmpegJNI.MediaOutput_open_for_trimming(l, a1, s1, l1, b2);
    }

    public final boolean b() {
        return ffmpegJNI.MediaOutput_close(b, this);
    }

    protected final void finalize() {
        a();
    }
}
